﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Admin/Main.master"
    ValidateRequest="false" Title="编辑图文" CodeFile="PicEdit.aspx.cs" Inherits="Admin_PicEdit" %>

<%@ Register TagPrefix="uc" TagName="ContentMenu" Src="~/Admin/ContentMenu.ascx" %>
<%@ Register Assembly="DotNetTextBox" Namespace="DotNetTextBox" TagPrefix="DNTB" %>
<asp:Content ID="Content1" ContentPlaceHolderID="LeftMenu" runat="Server">
    <uc:ContentMenu ID="ContentMenu" runat="server" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MidContent" runat="Server">
    <div id="mainMenu">
        <ul>
            <li>
                <asp:HyperLink ID="PicLink" runat="server">添加图文</asp:HyperLink>
            </li>
            <li><a href="PicList.aspx">图文列表</a></li><li><a href="PicEdit.aspx">图文编辑</a></li><li>
                <a href="PicClass.aspx">分类管理</a></li></ul>
    </div>
    <div id="main">
        <asp:Label ID="Msg" runat="server" Text="" CssClass="msg" Visible="False"></asp:Label>
        <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D7D7D7">
            <tr>
                <td colspan="2" bgcolor="#FFFFFF" class="mainTitle">
                    "<asp:Label ID="MenuName" runat="server" ForeColor="Black"></asp:Label>" 编辑图文&nbsp;
                </td>
            </tr>
            <tr>
                <td align="right" bgcolor="#FFFFFF">
                    图文ID:
                </td>
                <td bgcolor="#FFFFFF">
                    <asp:Label ID="ShowPicId" runat="server" ForeColor="Red"></asp:Label>
                </td>
            </tr>
            <tr>
                <td align="right" bgcolor="#FFFFFF" class="mainContentLeftTd">
                    所属分类:
                </td>
                <td bgcolor="#FFFFFF" class="mainContentRightTd">
                    <asp:DropDownList ID="PicClassIdList" runat="server">
                    </asp:DropDownList>
                    →<a href="PicClass.aspx">分类管理</a>
                </td>
            </tr>
            <tr>
                <td align="right" bgcolor="#FFFFFF">
                    图文标题:
                </td>
                <td bgcolor="#FFFFFF">
                    <asp:TextBox ID="PicTitle" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="PicTitle"
                        Display="Dynamic" ErrorMessage="图文标题必须填写"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td align="right" bgcolor="#FFFFFF">
                    设置关键字:
                </td>
                <td bgcolor="#FFFFFF">
                    <asp:TextBox ID="txtkeys" runat="server"></asp:TextBox><span class="explain">&nbsp;
                        多个关键字请用,分开</span>
                </td>
            </tr>
            <tr>
                <td align="right" bgcolor="#FFFFFF">
                    小图:
                </td>
                <td bgcolor="#FFFFFF">
                    &nbsp;<asp:FileUpload ID="PicSmall" runat="server" />&nbsp;尺寸：248*329px
                    <asp:CustomValidator ID="PicSmallCustomValidator" runat="server" ControlToValidate="PicSmall"
                        Display="Dynamic" ErrorMessage="小图文件格式错误" OnServerValidate="PicSmallCustomValidator_ServerValidate"></asp:CustomValidator>
                    <asp:HyperLink ID="PicSmallHyperLink" runat="server" Target="_blank">预览原图</asp:HyperLink><span
                        class="explain">&nbsp; 不修改请留空</span>
                </td>
            </tr>
            <tr>
                <td align="right" bgcolor="#FFFFFF">
                    添加时间:
                </td>
                <td bgcolor="#FFFFFF">
                    <asp:TextBox ID="AddTime" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="AddTime"
                        Display="Dynamic" ErrorMessage="添加时间必须填写"></asp:RequiredFieldValidator>&nbsp;
                    <asp:CustomValidator ID="CustomValidator1" runat="server" ControlToValidate="AddTime"
                        Display="Dynamic" ErrorMessage="时间格式错误！" OnServerValidate="CustomValidator1_ServerValidate"></asp:CustomValidator>
                </td>
            </tr>
            <tr>
                <td align="right" bgcolor="#FFFFFF">
                    权重:
                </td>
                <td bgcolor="#FFFFFF">
                    &nbsp;<asp:TextBox runat="server" ID="txtorder" Text="0" Width="50px" ondrop="return regInput(this,	/^[0-9]*$/,		event.dataTransfer.getData('Text'))"
                        onKeyPress="return regInput(this,	/^[0-9]*$/,		String.fromCharCode(event.keyCode))"
                        onpaste="return regInput(this,	/^[0-9]*$/,		window.clipboardData.getData('Text'))"></asp:TextBox>&nbsp;
                </td>
            </tr>
                <tr>
                    <td align="right" bgcolor="#FFFFFF">
                        内容摘要:
                    </td>
                    <td bgcolor="#FFFFFF">
                        &nbsp;<asp:TextBox ID="PicShortContent" runat="server" Rows="4" TextMode="MultiLine"></asp:TextBox>
                    </td>
                </tr>
            <tr>
                <td align="right" bgcolor="#FFFFFF">
                    图文内容:
                </td>
                <td bgcolor="#FFFFFF">
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td colspan="2" align="left" bgcolor="#ffffff">
                    <div class="mainNoLeftTd">
                        <DNTB:WebEditor ID="PicContent" runat="server" Width="95%" Height="300px" MenuConfig="all_3row.config" />
                    </div>
                </td>
            </tr>
            <tr>
                <td align="right" bgcolor="#FFFFFF">
                </td>
                <td bgcolor="#FFFFFF">
                    &nbsp;<asp:Button ID="Edit" runat="server" Text="编辑图文" CssClass="inputBt" OnClick="Edit_Click" />
                </td>
            </tr>
        </table>
    </div>
    <div id="pic-window" class="x-hidden">
        <div class="x-window-header">
            图片预览</div>
    </div>

    <script language="JavaScript" type="text/javascript">
        topMenuThisPage(2);//当前位置顶部菜单标识
        contentSubMenuThisPage();//当前位置左侧菜单标识
        mainMenuThisPage(3);//当前选项卡标识
        showPic();//预览图片
    </script>

</asp:Content>
